package io.renren.modules.cutpos.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.cutpos.dao.CutposDao;
import io.renren.modules.cutpos.entity.CutposEntity;
import io.renren.modules.cutpos.service.CutposService;


@Service("cutposService")
public class CutposServiceImpl extends ServiceImpl<CutposDao, CutposEntity> implements CutposService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CutposEntity> page = this.page(
                new Query<CutposEntity>().getPage(params),
                new QueryWrapper<CutposEntity>().like("name", params.get("key"))
        );

        return new PageUtils(page);
    }

}